package com.cabinet.service.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import com.cabinet.web.entity.Lattice;

public interface LatticeDao extends JpaRepository<Lattice, Long>,JpaSpecificationExecutor<Lattice>{

	@Query("select a from Lattice a where a.cabId = ?1 and a.commoditiesId = ?2")
	public List<Lattice> getLatticeByCoid(String cabId,Long commoditiesId);
	
	@Query("select a from Lattice a where a.cabId = ?1")
	public List<Lattice> getLatticeListBycid(String cabId);
	
}
